<?php 

namespace app\common\validate;
use think\Validate;
class Bank extends Validate
{
    protected $rule = [
        'realname'  =>  'require|chs',
        'bankname' =>  'require|chs',
        'bankcard' =>  'require',
        'bankaddress' => 'require',
        'default' =>  'in:0,1',
    ];
    
    protected $message = [
        'realname.require'  =>  '户主名必须',
        'realname.chs'  =>  '请正确输入户主名',
        'bankname.require' =>  '银行名称必须',
        'bankname.chs'  =>  '请输入中文银行名称',
        'bankcard.require' =>  '银行卡必须',
        'bankaddress.require' =>  '开户地址必须',
        'default.in' =>  '状态不正确',
    ];
    
    protected $scene = [
        'add'   =>  ['realname','bankname','bankcard','bankaddress','default'],
        'edit'  =>  ['realname','bankname','bankcard','bankaddress','default'],
    ];
}

 ?>